
import { HttpClientModule } from '@angular/common/http';
import { HttpModule } from '@angular/http';
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { IonicStorageModule } from '@ionic/storage';

import { TabRankPage } from '../pages/tab-rank/tab-rank';
import { TabDynamicPage } from '../pages/tab-dynamic/tab-dynamic';
import { TabHomePage } from '../pages/tab-home/tab-home';
import { TabMyPage } from '../pages/tab-my/tab-my';
import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';

//2018-12-25 13:00
import { RulePage } from './../pages/rule/rule';
import { UserCashPage } from './../pages/user-cash/user-cash';
import { UserRechargePage } from './../pages/user-recharge/user-recharge';
import { UserBindBankPage } from './../pages/user-bind-bank/user-bind-bank';
import { GoodsinfoPage } from './../pages/goodsinfo/goodsinfo';
//2018-12-29 10:10
import { UserCashRecordPage } from './../pages/user-cash-record/user-cash-record';
import { UserAgentPage } from './../pages/user-agent/user-agent';
import { UserHistoryPage } from './../pages/user-history/user-history';
import { UserServicePage } from './../pages/user-service/user-service';
import { UserServicePicPage } from './../pages/user-service-pic/user-service-pic';



import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { ServiceProvider } from '../providers/service/service';
import { PublicCompoentsProvider } from '../providers/public-compoents/public-compoents';
import { ApiProvider } from '../providers/api/api';

// 自定义
import { AppService } from './app.serve';


@NgModule({
    declarations: [
        MyApp,
        TabRankPage,
        TabDynamicPage,
        TabHomePage,
        TabMyPage,
        TabsPage,
        LoginPage,
        UserRechargePage,
        RulePage,
        UserCashPage,
        UserBindBankPage,
        GoodsinfoPage,
        UserCashRecordPage,
        UserAgentPage,
        UserHistoryPage,
        UserServicePage,
        UserServicePicPage
    ],
    imports: [
        BrowserModule,
        HttpClientModule,
        HttpModule,
        IonicModule.forRoot(MyApp, {
            iconMode: 'ios',
            modalEnter: 'modal-slide-in',
            modalLeave: 'modal-slide-out',
            backButtonText: '',
            mode: "ios",
            tabsHideOnSubPages: 'true',
            swipeBackEnabled: 'true',
            platforms: {
                ios: {
                    statusbarPadding: true
                },
                android: {
                    statusbarPadding: false
                }
            }
        }),
        IonicStorageModule.forRoot(),
        HttpModule

    ],
    bootstrap: [IonicApp],
    entryComponents: [
        MyApp,
        TabRankPage,
        TabDynamicPage,
        TabHomePage,
        TabMyPage,
        TabsPage,
        LoginPage,
        UserRechargePage,
        RulePage,
        UserCashPage,
        UserBindBankPage,
        GoodsinfoPage,
        UserCashRecordPage,
        UserAgentPage,
        UserHistoryPage,
        UserServicePage,
        UserServicePicPage
    ],
    providers: [
        StatusBar,
        SplashScreen,
        { provide: ErrorHandler, useClass: IonicErrorHandler },
        ServiceProvider,
        PublicCompoentsProvider,
        ApiProvider,
        AppService,
    ]
})
export class AppModule { }
